﻿
namespace IISLogAnalyzer.Web.Services
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;
    using IISLogAnalyzer.Data.Providers;
    using IISLogAnalyzer.Model.Entities;


    [EnableClientAccess()]
    public class IISWebLogService : DomainService
    {
        public List<W3CLogging> GetAllData()
        {
            List<W3CLogging> result = null;

            DataProvider provider = CreateDataProvider();

            result = provider.GetAllLogData();

            return result;
        }

        private DataProvider CreateDataProvider()
        {
            DataProvider target = DataProviderManager.Providers["FileLogProvider"];
            return target;
        }
    }
}


